$def with (page, name, views, count)

$var title = 'All posts'
$var view = 'top_a_select'
$var base = True
$var name = name
$code:
    current = int(session.get('current', '0'))

$for post in views:
    <div class="post">
    <div class="header_post">    
    <div class="title_post">
    $:post.title
    </div>
    <div class="delete_post">    
    $if session.logged:        
        <a href="/delete?id=$:post.id"><img src="static/img/delete.gif"/></a> 
    </div>    
    </div>
    <div class="body_post">
    <p>
    $:post.text
    </p>
    </div>
    <div class="footer_post">
    <hr/>
    <div style="font-size:14px;">
    #1234 от 01.04.11 
    $if session.logged:    
        <a href="/edit?id=$:post.id"> edit... </a>
    </div>    
    </div>
    </div>
    
<div class="post">    
$if count > 0:
    $if current != 1:
        <div style="position:absolute;width:10%;left:5px;">
        <a href="/?id=$:(current-1)">&#8592;Туда</a>
        </div>
    <div style="position:relative;width:80%;left:10%;float:left;text-align:center;">
        
    $for i in xrange(1, count+1):
        $if current == i:
            $:i
        $else:
            <a href="/?id=$:i">$:i</a>
    </div>
    
    $if count != current:
        <div style="position:absolute;width:10%;right:5px;">
        <a href="/?id=$:(current+1)">Сюда&#8594;</a>
        </div>
<br/>